FROM tomcat:8
MAINTAINER Yuan Li
#COPY ./build/libs/test-pipline-1.0-SNAPSHOT.jar /app.jar
COPY ./ /test-pipeline/
WORKDIR /test-pipeline
RUN ["ls","/test-pipeline/gradlew"]
#COPY ./build/libs/test-pipline-1.0-SNAPSHOT-plain.war  /usr/local/tomcat/webapps/
EXPOSE 8080
RUN ["chmod", "+x","/test-pipeline/gradlew"]
RUN ["/test-pipeline/gradlew", "war"]
RUN ["cp","/test-pipeline/build/libs/test-pipline-1.0-SNAPSHOT-plain.war","/usr/local/tomcat/webapps"]
CMD ["catalina.sh","run"]
#ENTRYPOINT ["java","-jar","/app.jar"]